This invention involves a method to modify that an operation needs to be done on a file system. This involves the concepts of xe2x80x9cdefragmentationxe2x80x9d, which is the process of rewriting parts of a file to contiguous sectors on a hard disk to increase the speed of access and retrieval.
When an application requests the file system create or append a file, the file system will attempt to allocate the required number of disk blocks contiguously. If contiguous disk blocks cannot be obtained, no indication or return code is given to the application to indicate that this problem occurred and noncontiguous blocks are allocated to this application. Subsequently, poorer performance can be observed within the application.
In the present art, this problem is solved by the user noticing that the file system performance is degrading and running a defragmented utility. This, however, is a haphazard way of resolving this problem, because the user may experience gradual performance degradation not readily attributable to disk fragmentation problems.
The following definitions are given to assist in making the present invention more readily understood.
Fragmentation: This is the scattering of parts of the same disk over different areas of the disk.
Fragmentation occurs as files on a disk are deleted and new files are added. Such fragmentation slows disk access and degrades the overall performance of disk operations. Utility programs are available for rearranging file storage on fragmented disks.
Defragmentation: The process of rewriting parts of a file to contiguous sectors on a hard disk to increase the speed of access and retrieval. When files are updated, the computer tends to save these updates on the larger continuous space on the hard disk which is often on a different sector than the other parts of the file. When the files are thus xe2x80x9cfragmentedxe2x80x9d, the computer must search the hard disk each time the file is accessed to find all of the parts of the file. This slows down the response time. For example, the operating systems Windows98(trademark) and WindowsNT(trademark) include fragmentation utilities as part of the operating system.
Flag: Broadly speaking it is a xe2x80x9cmarkerxe2x80x9d of some type used by a computer in processing or interpreting information; a signal indicating the existence or status of a particular condition. Flags are used in such areas as communications, programming and information processing. Depending on its use, a flag can be a code embedded in data that identifies some condition.
Extents: On a disk or other direct access storage device, a continuous block of storage space reserved by the operating system for a particular file or program.
For optimal performance, a file written to a disk must be placed contiguously. Most advanced file systems provide a utility to perform defragmentation of the file system to improve performance. One aspect of the present invention is to create xe2x80x9cextentsxe2x80x9d (disk blocks for a file) contiguously. There are cases, however, where the file system has been fragmented to a point that it is not able to allocate extents contiguously. These are when an application requests the file system create or append a file, the file system will attempt to allocate the required number of disk blocks contiguously. If contiguous disk blocks cannot be obtained, no indication or return code, is given to the application to indicate this problem occurred and noncontiguous blocks are allocated to this application. Subsequently, poor performance can be observed within the application. The present invention has been designed to correct this problem.
Thus, this invention involves a method to modify an operation that needs to be done on a file system to correct the above-referenced problem. This involves the concept of xe2x80x9cdefragmentationxe2x80x9d. The present invention provides a system xe2x80x9cadministratorxe2x80x9d that sets up a profile of when the file system should have the defragmentation utility run. So there would be two fields in the profile; one for the number of times that contiguous allocation failed and the other is the size of the allocation. No application (file system utility) that uses the file system to tell when it is fragmented and that a defragmentation utility is needed to be run.
The present invention will be better understood and its numerous objects and advantages will become more apparent to those skilled in the art by reference to the following drawings, in conjunction with the accompanying specification, in which:
FIG. 1 represents a flowchart of when an application requests the file system be created, which will notify the user when the defragmentation utility needs to be run; and
FIG. 2 is a flowchart extension of FIG. 1 and completes the demonstration of the method.